package com.shopcz.lsy.manager;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.shopcz.dao.GoodsDao;
import com.shopcz.dao.TypeDao;

public class ModifyProduct {
	public String modify(HttpServletRequest request,HttpServletResponse response){
		int id=Integer.parseInt(request.getParameter("id"));
      
		GoodsDao go=new GoodsDao();
		request.getSession().setAttribute("goods", go.queryGoodsByGoodId(id));
		int ids=go.queryGoodsByGoodId(id).getTypeId();
		request.getSession().setAttribute("goods", go.queryGoodsByGoodId(id));
		
		
		
		TypeDao ty=new TypeDao();
		request.getSession().setAttribute("type",ty.queryType());
		request.getSession().setAttribute("typename", ty.queryTypeByTypeId(ids).getTypeName());

		return "modify_ok";
	}
}
